/**
 * Created by johnforrest on 2017/10/20.
 */
// $(document).ready(function () {
//     $("#btn").click(function () {
//         var e=jQuery.Event("MyEvent");//此处一定是Event
//         $("#btn").trigger(e);
//     })
//
//     $("#btn").on("MyEvent",function (event) {
//         console.log(event);
//     })
// })
var btnClick
$(document).ready(function () {
    btnClick=$("#btn");
    btnClick.click(function () {
        var e=jQuery.Event("MyEvent");//此处一定是Event
        $("#btn").trigger(e);
    })

    btnClick.on("MyEvent",function (event) {
        console.log(event);
    })
})
